{% extends "admin/admin_base.html" %}

{% block content %}

<h1>修改文章</h1>
<form action="" method="post" enctype="multipart/form-data">
    {{ form.hidden_tag() }}
    <div class="form-group">
        <label>{{ form.post_pic.label }}</label>
        <input type="file" name="post_pic">
        {% for error in form.post_pic.errors %}
        <span style="color: red;">[{{ error }}]</span>
        {% endfor %}
    </div>
    <div class="form-group">
        <label>{{ form.post_title.label }}</label>
        {{ form.post_title(size=100, class="form-control") }}
        {% for error in form.post_title.errors %}
        <span class="text-danger">{{ error }}</span>
        {% endfor %}
    </div>
    <div class="form-group">
        <label>{{ form.post_body.label }}</label>
        {{ form.post_body(cols=100, rows=10, class="form-control",id="post-content") }}<br>
        {% for error in form.post_body.errors %}
        <span class="text-danger">{{ error }}</span>
        {% endfor %}
    </div>
    <p>{{ form.submit(class="btn btn-primary") }}</p>
</form>

{% endblock %}